Optimal. Leaf size=55 \[ \frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{\sqrt {a} f (a+b)}-\frac {\tanh ^{-1}(\cos (e+f x))}{f (a+b)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4133, 481, 206, 205} \[ \frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{\sqrt {a} f (a+b)}-\frac {\tanh ^{-1}(\cos (e+f x))}{f (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 206
Rule 481
Rule 4133
Rubi steps
\begin {align*} \int \frac {\csc (e+f x)}{a+b \sec ^2(e+f x)} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^2}{\left (1-x^2\right ) \left (b+a x^2\right )} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (e+f x)\right )}{(a+b) f}+\frac {b \operatorname {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{(a+b) f}\\ &=\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{\sqrt {a} (a+b) f}-\frac {\tanh ^{-1}(\cos (e+f x))}{(a+b) f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.76, size = 239, normalized size = 4.35 \[ \frac {\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{\sqrt {a}}+\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{\sqrt {a}}+\log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )}{f (a+b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.76, size = 156, normalized size = 2.84 \[ \left [\frac {\sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, {\left (a + b\right )} f}, \frac {2 \, \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) - \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, {\left (a + b\right )} f}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.78, size = 76, normalized size = 1.38 \[ \frac {b \arctan \left (\frac {a \cos \left (f x +e \right )}{\sqrt {a b}}\right )}{f \left (a +b \right ) \sqrt {a b}}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{f \left (2 a +2 b \right )}-\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{f \left (2 a +2 b \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 64, normalized size = 1.16 \[ \frac {\frac {2 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} {\left (a + b\right )}} - \frac {\log \left (\cos \left (f x + e\right ) + 1\right )}{a + b} + \frac {\log \left (\cos \left (f x + e\right ) - 1\right )}{a + b}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.21, size = 123, normalized size = 2.24 \[ -\frac {\mathrm {atanh}\left (\frac {\cos \left (e+f\,x\right )\,\left (2\,a^3+2\,a\,b^2\right )-\frac {\cos \left (e+f\,x\right )\,\left (8\,a^5+8\,a^4\,b-8\,a^3\,b^2-8\,a^2\,b^3\right )}{4\,{\left (a+b\right )}^2}}{2\,a\,b\,\left (a+b\right )}\right )}{f\,\left (a+b\right )}-\frac {\mathrm {atanh}\left (\frac {\cos \left (e+f\,x\right )\,\sqrt {-a\,b}}{b}\right )\,\sqrt {-a\,b}}{f\,\left (a^2+b\,a\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc {\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________